﻿namespace ihongma.Web.Plugin.Feedback
{
    using ihongma.Common;
    using ihongma.Web.Plugin.Feedback.BLL;
    using ihongma.Web.UI;
    using System;
    using System.Data;
    using System.Runtime.InteropServices;
    using System.Xml;
    public class afeedback : BasePage
    {
        protected int page;
        protected int totalcount;

        public DataTable get_feedback_list(int top, string strwhere)
        {
            DataTable table = new DataTable();
            string strWhere = "is_lock=0";
            if (!string.IsNullOrEmpty(strwhere))
            {
                strWhere = strWhere + " and " + strwhere;
            }
            return new feedback().GetList(top, strWhere).Tables[0];
        }

        public DataTable get_feedback_list(int page_size, int page_index, string strwhere, out int totalcount)
        {
            DataTable table = new DataTable();
            string strWhere = "is_lock=0";
            if (!string.IsNullOrEmpty(strwhere))
            {
                strWhere = strWhere + " and " + strwhere;
            }
            return new feedback().GetList(page_size, page_index, strWhere, "add_time desc", out totalcount).Tables[0];
        }

        protected override void ShowPage()
        {
            this.page = DTRequest.GetQueryInt("page", 1);
        }
    }
}

